﻿
namespace SvGame.Cached;

public static partial class CacheGame
{
    public static Dictionary<long, City> DictCity = new();

    public static bool GetCity(long uid, out City obj)
        => DictCity.TryGetValue(uid, out obj);

    public static void LoadCitys()
    {
        foreach (var conf in ConfCity.Values)
        {
            if (NewCity(conf, out var obj))
            {
                DictCity[obj.Uid] = obj;
            }
        }
        loger.Info($"DictCity:{DictCity.Count}");
    }

}
